package client.view;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.ListModel;
import javax.swing.WindowConstants;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class ClientCommunicationWindow extends javax.swing.JFrame {
    private static final long serialVersionUID = 6630099302480122622L;
	private JList listOnlineClients;
	private JLabel lblOnlineClients;
	private JPanel jPanel1;
	private JScrollPane jScrollPane1;
	private JPanel jPanel3;
	private JPanel jPanel2;
	private JButton buttonSend;
	private JTextField textFieldMessage;
	private JTextArea textAreaMessages;

	public ClientCommunicationWindow() {
		super();
		initGUI();
		setLocationRelativeTo(null);
	}
	
	private void initGUI() {
		try {
			GridBagLayout thisLayout = new GridBagLayout();
			thisLayout.rowWeights = new double[] {0.0, 0.1, 0.0, 0.0, 0.0};
			thisLayout.rowHeights = new int[] {10, 7, 10, 15, 10};
			thisLayout.columnWeights = new double[] {0.0, 0.1, 0.0};
			thisLayout.columnWidths = new int[] {10, 7, 10};
			getContentPane().setLayout(thisLayout);
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				jPanel3 = new JPanel();
				BoxLayout jPanel3Layout = new BoxLayout(jPanel3, javax.swing.BoxLayout.X_AXIS);
				jPanel3.setLayout(jPanel3Layout);
				getContentPane().add(jPanel3, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
				{
					jScrollPane1 = new JScrollPane();
					jPanel3.add(jScrollPane1);
					jScrollPane1.setPreferredSize(new java.awt.Dimension(235, 206));
					jScrollPane1.setAutoscrolls(true);
					jScrollPane1.setVerifyInputWhenFocusTarget(false);
					{
						textAreaMessages = new JTextArea();
						jScrollPane1.setViewportView(textAreaMessages);
						textAreaMessages.setText("Messages");
						textAreaMessages.setPreferredSize(new java.awt.Dimension(244, 172));
						textAreaMessages.setBorder(BorderFactory.createTitledBorder(""));
						textAreaMessages.setEditable(false);
					}
				}
				{
					jPanel1 = new JPanel();
					jPanel3.add(jPanel1);
					GridBagLayout jPanel1Layout = new GridBagLayout();
					jPanel1Layout.rowWeights = new double[] {0.0, 0.0, 0.1};
					jPanel1Layout.rowHeights = new int[] {15, 10, 7};
					jPanel1Layout.columnWeights = new double[] {0.0, 0.1, 0.0};
					jPanel1Layout.columnWidths = new int[] {10, 7, 10};
					jPanel1.setLayout(jPanel1Layout);
					jPanel1.setPreferredSize(new java.awt.Dimension(130, 183));
					{
						lblOnlineClients = new JLabel();
						jPanel1.add(lblOnlineClients, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
						lblOnlineClients.setText("Online Clients");
						lblOnlineClients.setFont(new java.awt.Font("Segoe UI",0,14));
					}
					{
						ListModel listOnlineClientsModel = 
								new DefaultComboBoxModel(
										new String[] { "Item One", "Item Two" });
						listOnlineClients = new JList();
						jPanel1.add(listOnlineClients, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
						listOnlineClients.setModel(listOnlineClientsModel);
						listOnlineClients.setPreferredSize(new java.awt.Dimension(143, 36));
						listOnlineClients.setBorder(BorderFactory.createTitledBorder(""));
					}
				}
			}
			{
				jPanel2 = new JPanel();
				BoxLayout jPanel2Layout = new BoxLayout(jPanel2, javax.swing.BoxLayout.X_AXIS);
				getContentPane().add(jPanel2, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
				jPanel2.setLayout(jPanel2Layout);
				{
					textFieldMessage = new JTextField();
					jPanel2.add(textFieldMessage);
					textFieldMessage.setText("Message");
					textFieldMessage.setPreferredSize(new java.awt.Dimension(198, 23));
					textFieldMessage.setBorder(BorderFactory.createTitledBorder(""));
				}
				{
					buttonSend = new JButton();
					jPanel2.add(buttonSend);
					buttonSend.setText("Send");
					buttonSend.setBorder(BorderFactory.createTitledBorder(""));
					buttonSend.setFont(new java.awt.Font("Segoe UI",1,10));
				}
			}
			pack();
			setSize(400, 300);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
    public JButton getButtonSend() {
    	return buttonSend;
    }

	public JList getListOnlineClients() {
    	return listOnlineClients;
    }

	public JTextArea getTextAreaMessages() {
		return textAreaMessages;
	}
	
	public JTextField getTextFieldMessage() {
		return textFieldMessage;
	}

}
